<template>
  <div>
    <label v-for="(itme, index) in arr" :key="index">
      <input type="checkbox" v-model="err" :value="itme" />{{ itme }}
    </label>
    <p>您选中数的累加值：{{ fn }}</p>
  </div>
</template>

<script>
export default {
  // name: "",
  data() {
    return {
      arr: [9, 15, 19, 25, 29, 31, 48, 57, 62, 79, 87],
      err: [],
    };
  },
  computed: {
    fn() {
      return this.err.reduce((sum, itme) => {
        return (sum += itme);
      }, 0);
    },
  },
};
</script>

<style></style>
